import Mock from 'mockjs'
Mock.setup({
    timeout: 1500
})
Mock.mock('/test/data', 'get', {
    code: 200,
    msg: 'success',
    'list|20': [{name: '@name', age: '@integer(18, 25)'}]
})
Mock.mock('/getName', 'get', {
    code: 200,
    msg: 'success',
    result: {name: '@cname'}
})
Mock.mock('/getTable', 'get', {
    code: 200,
    msg: 'success',
    result: [
        {
            tit: "整线停电",
            'num1|10-400':0,
            'num2|20-100':0,
            subTit: "影响台区"
        },
        {
            tit: "支线停电",
            'num1|10-400':0,
            'num2|20-600':0,
            subTit: "影响台区"
        },
        {
            tit: "台区停电",
            'num1|10-400':0,
            'num2|20-50000':0,
            subTit: "影响用户"
        },
        {
            tit: "低压停电",
            'num1|10-400':0,
            'num2|20-600':0,
            subTit: "影响用户"
        },
        {
            tit: "用户停电",
            'num1|10-400':0,
            'num2|20-8000':0,
            subTit: "平均时长"
        },
    ],
})

Mock.mock('/getList','get',{
    code:200,
    msg:"success",
    'list|200':[
        {id:'@id',name: '@cname', age: '@integer(18, 25)',address:'@city',birthday:'@datetime',describe:'@cparagraph'}
    ]
})